/**
 * FileName: SimpleDateFormatTest
 * Author:   powersi
 * Date:     2021/3/30 10:52
 * Description:
 */
package com.zm.demo.core.concurrent;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Description: 
 * Author:      powersi
 * Date:        2021/3/30 10:52
 */
public class SimpleDateFormatTest {


    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 20; i++) {
            executorService.submit(()->{
                try {
                    System.out.println(sdf.parse("2021-03-30 10:35:00"));
                } catch (ParseException e) {
                    e.printStackTrace();
                }
            });
        }

        executorService.shutdown();
    }
}
